import pymysql
import codecs
import pymysql.cursors

conn = pymysql.connect(host='127.0.0.1', user='root', passwd='', db = 'jobs', port=3306,charset="utf8")

cur = conn.cursor()
url="'http://jobs.51job.com/shanghai/.html?s=01&amp;t=0'"
url2='"http://jobs.51job.com/shanghai/93151525.html?s=01&amp;t=0"'
sql = "select count(*) from jobs where url = "
count = cur.execute(sql+ url)
cds=cur.fetchall() 
print cds
print sql + url